package action;

import java.util.Iterator;
import java.util.List;

import dao.BookDao;
import dao.LendDao;

public class Bookaction {
	private LendDao lenddao;
	private BookDao bookDao;
	
	List list,listbook;
	int bookid;
	String test;

	public void setBookDao(BookDao bookDao) {
		this.bookDao = bookDao;
	}

	public List getListbook() {
		return listbook;
	}

	public void setListbook(List listbook) {
		this.listbook = listbook;
	}

	public void setLenddao(LendDao lenddao) {
		this.lenddao = lenddao;
	}

	public List getList() {
		return list;
	}

	public void setList(List list) {
		this.list = list;
	}

	public int getBookid() {
		return bookid;
	}

	public void setBookid(int bookid) {
		this.bookid = bookid;
	}

	public String getTest() {
		return test;
	}

	public void setTest(String test) {
		this.test = test;
	}

	public String choose(){
		listbook = bookDao.selectAllBook();
		list = lenddao.selectBook(test);
		Iterator i = list.iterator();
		while(i.hasNext())
		{
			System.out.println(i.next());
		}
		return "func1";
	} 
	
	
}
